1720 PRINT "Have Data Diskette(s) in Place, then Press any key to continue.";
1730 K$ = INKEY$ : IF K$ = "" THEN 1730
1740 KEY ON : CLS : KEY OFF
2000 REM PRINTMAR Program Starts Here
2010 OPEN DD.PERS$+"persfile" AS #1 LEN = 256
2020 FIELD 1, 5 AS F1$, 20 AS F2$, 30 AS F3$, 2 AS F4$, 5 AS F5$, 5 AS F6$, 5 AS F7$, 11 AS F8$, 18 AS F9$, 16 AS F10$, 16 AS F11$, 11 AS F12$, 18 AS F13$, 16 AS F14$, 16 AS F15$, 11 AS F16$, 18 AS F17$, 16 AS F18$, 16 AS F19$
2030 OPEN DD.MARR$+"marrfile" AS #2 LEN = 128
2040 FIELD 2, 5 AS M1$, 5 AS M2$, 5 AS M3$, 5 AS M4$, 11 AS M5$, 18 AS M6$, 16 AS M7$, 16 AS M8$, 45 AS M9$
2050 REM Determine User Wants
2060 KEY ON : CLS : KEY OFF : LOCATE 21,1
2070 INPUT "Enter the Marriage Number to be Printed (0 to quit), or 'all'"; REPLY$
2080 IF REPLY$ = "0" THEN 2870
2090 K = 0
2100 GOTO 2150
2110 LPRINT TAB(10);"Print-out of Contents of the Marriages File"
2120 LPRINT TAB(10);DATE$,TIME$
2130 LPRINT
2140 RETURN
2150 IF LEFT$(REPLY$,1) = "a" OR LEFT$(REPLY$,1) = "A" THEN 2210
2160 K = 4
2170 I = VAL(REPLY$)
2180 IF I < 1 OR I > MAX.MAR THEN KEY ON : CLS : KEY OFF : LOCATE 20,1 : PRINT "Number is out of range"; : GOTO 2070
2190 GOSUB 2110
2200 GOSUB 2260 : GOTO 2060
2210 REM Read all records, and print the actual ones
2220 FOR I = 1 TO MAX.MAR
2230 LOCATE 22,1 : PRINT "Processing Record";I;
2240 GOSUB 2260
2250 GOTO 2800
2260 GET #2, I
2270 REM Extract information from the file for use
2280 T1 = CVS(M1$)
2290 IF T1 < 1 THEN 2790
2300 K = K + 1
2310 IF K MOD 5 = 1 THEN GOSUB 2110
2320 T2 = CVS(M2$)
2330 T3 = CVS(M3$)
2340 T4 = CVS(M4$)
2350 T5$ = M5$
2360 T6$ = M6$
2370 T7$ = M7$
2380 T8$ = M8$
2390 T9$ = M9$
2400 REM obtain the name of the husband
2410 GET #1, T2
2420 REM obtain the last and given names
2430 TEMP$ = F2$ 'Husband`s last name
2440 TMP$ = F2$
2450 GOSUB 2820
2460 TT2$ = TMP$
2470 TEMP$ = F3$ 'Husband's given names
2480 TMP$ = F3$
2490 GOSUB 2820
2500 TT3$ = TMP$
2510 REM obtain the name of the wife
2520 GET #1, T3
2530 REM obtain the last and given names
2540 TEMP$ = F2$ 'Wife`s last name
2550 TMP$ = F2$
2560 GOSUB 2820
2570 TT4$ = TMP$
2580 TEMP$ = F3$ 'Wife's given names
2590 TMP$ = F3$
2600 GOSUB 2820
2610 TT5$ = TMP$
2620 REM Now Print the Information
2630 LPRINT TAB(10);"Marriage Record-number : ";
2640 LPRINT USING "###"; T1
2650 LPRINT TAB(10);"Husband's Record Number: ";
2660 LPRINT USING "###"; T2;
2670 LPRINT TAB(42); LEFT$(TT2$+", "+TT3$,37)
2680 LPRINT TAB(10);"Wife`s Record Number : ";
2690 LPRINT USING "###"; T3;
2700 LPRINT TAB(42); LEFT$(TT4$+", "+TT5$,37)
2710 LPRINT TAB(10);"Marriage-date : ";T5$
2720 LPRINT TAB(10);"Marriage-city : ";T6$
2730 LPRINT TAB(10);"Marriage-county : ";T7$
2740 LPRINT TAB(10);"Marriage-state : ";T8$
2750 LPRINT TAB(10);"Comments: ";T9$
2760 LPRINT
2770 LPRINT : LPRINT
2780 IF K MOD 5 = 0 THEN LPRINT FORM.FEED$;
2790 RETURN
2800 NEXT I
2810 GOTO 2870
2820 REM rtrim$ subroutine
2830 FOR J = 1 TO LEN(TEMP$)-1
2840 IF RIGHT$(TMP$,1)=" " THEN TMP$ = LEFT$(TMP$,LEN(TMP$)-1) ELSE J = LEN(TEMP$)-1
2850 NEXT J
2860 RETURN
2870 CLOSE #1
2880 KEY ON : CLS : KEY OFF : LOCATE 21,1
2890 PRINT "End of Program"
2900 IF LEFT$(REPLY$,1) = "a" OR LEFT$(REPLY$,1) = "A" THEN 2910 ELSE 2920